<template>
	<view class="inline-flex center px-4 py-2 radius-4 bg-primary border-primary text-white fs-12 font-normal" @click="onClick">
		<text>新人立减 ¥{{price}}</text>
		<image v-if="link" class="size-16" src="@/static/svg/icon-arrow.svg"></image>
	</view>
</template>

<script setup name="NewComerCouponTag">
	const props = defineProps({
		price: {
			type: [Number, String],
			required: true
		},
		link: {
			type: Boolean,
			default: true
		}
	})
	const emits = defineEmits(['click'])
	
	const onClick = () => {
		emits('click')
	}
</script>
